<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="model.Category" %>  
<%@ page import="model.CategoryItem" %>  
<%@ page import="java.util.Iterator" %>  
<%@ page import="model.CategoryItem" %>  
<%@ page import="model.Figure" %>  
 <% 
 	Category category = (Category) session.getAttribute("category");
 	Iterator<CategoryItem> items = category.getClothingItems();
 	CategoryItem item;
 	Figure figure;
 	String path;
 	String description;
 	int id;
 %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Избери продукт</title>
<link rel="stylesheet" href="/Store/css/Administration.css" type="text/css">
</head>
<body>
<div class="container">

<% while(items.hasNext()){
	item = items.next();
	id = item.getId();
	figure = item.getFigures().next();
	path ="/Store/"+ figure.getPath();
	description = item.getDescription();

	%>
	<div class="main"> 
		<table class="center" style="border-spacing: 7px 0px">
			<tr> 
				<td> <%=description %></td>
				<td> <a href="/Store/ChooseProduct?id=<%= id %>&description=<%= description %>">  <img src="<%=path%>" style="width: 70px; height: 70px"> </a> </td> 
			</tr>
		</table>
	</div>
<%}%>
<div class="main"> 
<table class="center">
		<tr>
			<td class="cancel"> <a href="/Store/Supplier.html"> <button type="button"> Oткажи </button> </a></td>
		</tr>
	</table>
</div>
</div>
</body>
</html>